(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/script/JetTube.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, 'e74bbUm4kBIErmRAwoOYh1K', 'JetTube', __filename);
// script/JetTube.js

"use strict";

cc.Class({
    extends: cc.Component,

    properties: {
        player: cc.Node,
        jetPack: cc.Node
    },

    // onLoad () {},

    start: function start() {
        this.playerRig = this.player.getComponent(cc.RigidBody);
        this.playerPhysicsBox = this.player.getComponent(cc.PhysicsBoxCollider);
    },


    onBeginContact: function onBeginContact(contact, selfCollider, otherCollider) {
        if (this.player.model === "Land" && otherCollider.tag === 88 && selfCollider.tag === cc.vv.TAG.JETTUBE) {
            this.player.model = "JetTube";
            this.player.prop = "handLeave";
            this.jetPack.active = true;
        } else if (this.player.model === "JetTube" && otherCollider.tag === 88 && selfCollider.tag === cc.vv.TAG.JETTUBEEND) {
            //陆地
            this.player.model = "Land";
            this.player.prop = "Stand";
            this.jetPack.active = false;
            // this.playerRig._b2Body.m_linearVelocity.y = 8;
            // this.playerRig._b2Body.m_gravityScale = 3;
            // this.playerRig.fixedRotation = true;
        }
    }
});

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=JetTube.js.map
        